package com.jk.interfaces;

import com.jk.dto.TbAdmin;
import com.jk.pojo.PagedResponse;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author yzf
 * @version 1.0
 * @description: TODO
 * @date 2024/12/9 17:20
 */
public interface TbAdminServiceApi {

    //查询
    @PostMapping(value = "/tbadmin/findTbAdminList")
    public PagedResponse<TbAdmin> findTbAdminList(@RequestBody TbAdmin tbAdmin, @RequestParam(value = "pageNum") Integer pageNum, @RequestParam(value = "pageSize") Integer pageSize);

    //新增
    @PostMapping(value = "/tbadmin/addTbAdmin")
    public void addTbAdmin(@RequestBody TbAdmin tbAdmin);

    @PostMapping(value = "/tbadmin/findTbAdminByUserName")
    public TbAdmin findTbAdminByUserName(@RequestParam(value = "username") String username);

    //删除
    @DeleteMapping(value = "/tbadmin/deleteTbAdminById")
    public void deleteTbAdminById(@RequestParam(value = "id") Integer id);

    //回显
    @GetMapping(value = "/tbadmin/getTbAdminById")
    public TbAdmin getTbAdminById(@RequestParam(value = "id") Integer id);

    //修改
    @PutMapping(value = "/tbadmin/upTbAdmin")
    public void upTbAdmin(@RequestBody TbAdmin tbAdmin);

    //修改状态
    @PostMapping(value = "/tbadmin/upstatus")
    public void upstatus(@RequestBody TbAdmin tbAdmin);
    //修改状态
    @PostMapping(value = "/tbadmin/updatestatus")
    public void updatestatus(@RequestBody TbAdmin tbAdmin);

    @PostMapping(value = "/tbadmin/selectPermsByUserId")
    List<String> selectPermsByUserId(Integer id);
}
